<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    <script src="../bootstrap/js/jquery-3.5.1.js"></script>
    <script src="../js/lib/jquery-1.10.2.min.js"></script>
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<style>
    .wid-input{
        width: 150px;
    }
</style>
</head>
<body>



<div class="container-fluid" style="margin-top: 20px">
    <form id="form-like">
    <div class="row">
        <div class="col-md-4 ">
            <div class="form-group">
                <label for="" class="col-sm-3 control-label">姓名</label>
                <div class="col-sm-9">
                    <input name="name" class="form-control"  placeholder="姓名">
                </div>
            </div>
        </div>
        <div class="col-md-4 ">
            <div class="form-group">
                <label class="col-sm-3 control-label">电话</label>
                <div class="col-sm-9">
                    <input  name="tel" class="form-control"  placeholder="电话">
                </div>
            </div>
        </div>
        <div class="col-md-4 ">
            <div class="form-group">
                <label for="" class="col-sm-4 control-label">投保意向</label>
                <div class="col-sm-8">
                    <select name="intention" class="form-control">
                        <option value="">===请选择===</option>
                        <option value="无">无</option>
                        <option value="健康保险">健康保险</option>
                        <option value="儿童保险">儿童保险</option>
                        <option value="意外保险">意外保险</option>
                        <option value="年金保险">年金保险</option>
                        <option value="父母保险">父母保险</option>
                        <option value="高端医疗险">高端医疗险</option>
                    </select>
                </div>
            </div>
        </div>
    </div>
    <div class="row" style="margin-top: 20px">
        <div class="col-md-3 col-md-offset-9" style="text-align: right">
            <button type="button" class="btn btn-warning" data-toggle="modal" data-target="#myModal">新增潜在客户</button>
            <input id="btn-like" type="button" class="btn btn-warning" value="查询"/>
        </div>
    </div>
    </form>


    <div class="row" style="margin-top: 20px">
        <div class="col-md-12">
            <table id="tab-like" class="table table-striped" style="width: 90%;text-align: center" align="center">
                <tr style="font-weight: 700">
                    <td>姓名</td>
                    <td>性别</td>
                    <td>手机号</td>
                    <td>公司</td>
                    <td>投保意向</td>
                    <td>操作</td>
                </tr>
<!--                <tr>-->
<!--                    <td>张三</td>-->
<!--                    <td>男</td>-->
<!--                    <td>13200000000</td>-->
<!--                    <td>清华大学</td>-->
<!--                    <td>无</td>-->
<!--                    <td>-->
<!--                        <button data-toggle="modal" data-target="#showDesc" type="button" class="btn btn-primary">查看详情</button>-->
<!--                        <button  data-toggle="modal" data-target="#toNormal" type="button" class="btn btn-primary">转为正式客户</button>-->
<!--                    </td>-->
<!--                </tr>-->



            </table>
        </div>
    </div>

    <!--分页 begin-->
    <div class="row">
        <div class="col-md-12">
            <nav aria-label="Page navigation" style="float: right">
                <ul class="pagination">
<!--                    <li>-->
<!--                        <a href="#" aria-label="Previous">-->
<!--                            <span aria-hidden="true">&laquo;</span>-->
<!--                        </a>-->
<!--                    </li>-->
<!--                    <li><a href="#">1</a></li>-->
<!--                    <li><a href="#">2</a></li>-->
<!--                    <li><a href="#">3</a></li>-->
<!--                    <li><a href="#">4</a></li>-->
<!--                    <li><a href="#">5</a></li>-->
<!--                    <li>-->
<!--                        <a href="#" aria-label="Next">-->
<!--                            <span aria-hidden="true">&raquo;</span>-->
<!--                        </a>-->
<!--                    </li>-->
                </ul>
            </nav>

        </div>
    </div>
    <!--分页 end-->


</div>



<!-- 新增客户窗口 begin -->
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">新增潜在客户</h4>
            </div>

            <form id="form-add-customer">
            <div class="modal-body">
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">姓名</label>
                                <div class="col-sm-9">
                                    <input  name="name" class="form-control"  placeholder="姓名">
                                </div>
                            </div>
                        </div>
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">电话</label>
                                <div class="col-sm-9">
                                    <input name="tel" class="form-control"  placeholder="电话">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row" style="margin-top: 10px">
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">性别</label>
                                <div class="col-sm-9">
                                    <div class="radio">
                                        <label>
                                            <input type="radio" name="sex"  value="1" checked>
                                            男
                                        </label>
                                        <label>
                                            <input type="radio" name="sex"  value="0" checked>
                                            女
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">生日</label>
                                <div class="col-sm-9">
                                    <input  name="birthday" class="form-control"  type="date">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row" style="margin-top: 10px">
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-3 control-label" style="padding: 0;text-align: center">公司名称</label>
                                <div class="col-sm-9">
                                    <input name="company" class="form-control"  placeholder="公司名称">
                                </div>
                            </div>
                        </div>
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">职位</label>
                                <div class="col-sm-9">
                                    <input  name="position" class="form-control"  placeholder="职位">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row" style="margin-top: 10px">
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-3 control-label" style="padding: 0;text-align: center">家庭住址</label>
                                <div class="col-sm-9">
                                    <input  name="addr" class="form-control"  placeholder="家庭住址">
                                </div>
                            </div>
                        </div>
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-3 control-label" style="padding: 0;text-align: center">兴趣爱好</label>
                                <div class="col-sm-9">
                                    <input  name="hobby" class="form-control"  placeholder="兴趣爱好">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row" style="margin-top: 10px">
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-3 control-label" style="padding: 0;text-align: center">QQ号</label>
                                <div class="col-sm-9">
                                    <input name="qq" class="form-control"  placeholder="QQ号">
                                </div>
                            </div>
                        </div>
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">微信</label>
                                <div class="col-sm-9">
                                    <input name="wx" class="form-control"  placeholder="微信">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row" style="margin-top: 10px">
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-3 control-label" style="padding: 0;text-align: center">婚姻状况</label>
                                <div class="col-sm-9">
                                    <div class="radio">
                                        <label>
                                            <input type="radio" name="marrystatus"  value="0" >
                                            未婚
                                        </label>
                                        <label>
                                            <input type="radio" name="marrystatus"  value="1" >
                                                已婚
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-3 control-label" style="padding: 0;text-align: center">投保意向</label>
                                <div class="col-sm-9">
                                    <div class="checkbox">
                                        <label>
                                            <input name="intention" type="checkbox" value="无"> 无
                                        </label>
                                        <label>
                                            <input name="intention" type="checkbox" value="健康保险"> 健康保险
                                        </label>
                                        <label>
                                            <input name="intention" type="checkbox" value="儿童保险"> 儿童保险
                                        </label>
                                        <label>
                                            <input name="intention" type="checkbox" value="意外保险"> 意外保险
                                        </label>
                                        <label>
                                            <input name="intention" type="checkbox" value="年金保险"> 年金保险
                                        </label>
                                        <label>
                                            <input name="intention" type="checkbox" value="父母保险"> 父母保险
                                        </label>
                                        <label>
                                            <input name="intention" type="checkbox" value="高端医疗险"> 高端医疗险
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
            <div class="modal-footer">
                <input id="btn-customer" type="button" class="btn btn-primary" value="提交"/>
            </div>
            </form>

        </div>
    </div>
</div>
<!-- 新增潜在客户窗口 end -->

<!-- 查看详情 begin -->
<div class="modal fade" id="showDesc" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" >查看详情</h4>
            </div>
            <div class="modal-body">
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">姓名</label>
                                <div id="name-show" class="col-sm-9">
                                    张三
                                </div>
                            </div>
                        </div>
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">电话</label>
                                <div id="tel-show" class="col-sm-9">
                                    13200000000
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row" style="margin-top: 10px">
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">性别</label>
                                <div id="sex-show" class="col-sm-9">
                                    男
                                </div>
                            </div>
                        </div>
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">生日</label>
                                <div id="birthday-show" class="col-sm-9">
                                    2020-07-07
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row" style="margin-top: 10px">
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-3 control-label" style="padding: 0;text-align: center">公司名称</label>
                                <div id="company-show" class="col-sm-9">
                                    阿里巴巴
                                </div>
                            </div>
                        </div>
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">职位</label>
                                <div id="position-show" class="col-sm-9">
                                    挖掘机司机
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row" style="margin-top: 10px">
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-3 control-label" style="padding: 0;text-align: center">家庭住址</label>
                                <div id="addr-show" class="col-sm-9">
                                    山东省济南市银河路19号清华小区2号楼三单元
                                </div>
                            </div>
                        </div>
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-3 control-label" style="padding: 0;text-align: center">兴趣爱好</label>
                                <div id="hobby-show" class="col-sm-9">
                                    吃饭；睡觉；打豆豆
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row" style="margin-top: 10px">
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-3 control-label" style="padding: 0;text-align: center">QQ号</label>
                                <div id="qq-show" class="col-sm-9">
                                    123456
                                </div>
                            </div>
                        </div>
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">微信</label>
                                <div id="wx-show" class="col-sm-9">
                                    zhangsan_123
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row" style="margin-top: 10px">
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-3 control-label" style="padding: 0;text-align: center">婚姻状况</label>
                                <div id="marrystatus-show" class="col-sm-9">
                                    已婚
                                </div>
                            </div>
                        </div>
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-sm-3 control-label" style="padding: 0;text-align: center">投保意向</label>
                                <div id="intention-show" class="col-sm-9">
                                    儿童保险
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
            </div>
        </div>
    </div>
</div>
<!-- 查看详情 end -->

<!-- 转为正式客户窗口 begin -->
<div class="modal fade" id="toNormal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" >转正式客户</h4>
            </div>
            <form id="form-zz">
            <div class="modal-body">
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label style="padding: 0;text-align: center" class="col-sm-3 control-label">投保类型</label>
                                <div class="col-sm-9">
                                    <select name="insurancetype" class="form-control">
                                        <option value="">===请选择===</option>
                                        <option value="0">无</option>
                                        <option value="健康保险">健康保险</option>
                                        <option value="儿童保险">儿童保险</option>
                                        <option value="意外保险">意外保险</option>
                                        <option value="年金保险">年金保险</option>
                                        <option value="父母保险">父母保险</option>
                                        <option value="高端医疗险">高端医疗险</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label style="padding: 0;text-align: center" class="col-sm-3 control-label">投保产品</label>
                                <div class="col-sm-9">
                                    <select name="insuranceproduct" class="form-control">
                                        <option >===请选择===</option>
                                        <option value="1">真爱宝贝</option>
                                        <option value="2">青少年教育</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row" style="margin-top: 10px">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label style="padding: 0;text-align: center" class="col-sm-4 control-label">合同生效时间</label>
                                <div class="col-sm-8">
                                    <input name="start" type="date"  class="form-control wid-input"  placeholder="合同编号" >
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label style="padding: 0;text-align: center" class="col-sm-4 control-label">合同结束时间</label>
                                <div class="col-sm-8">
                                    <input name="end" type="date"  class="form-control wid-input"  placeholder="合同编号" >
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row" style="margin-top: 10px">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label style="padding: 0;text-align: center" class="col-sm-3 control-label">合同编号</label>
                                <div class="col-sm-9">
                                    <input name="num" class="form-control"  placeholder="合同编号">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <input type="button" value="提交" class="btn btn-primary form-zz "/>
            </div>
            </form>
        </div>
    </div>
</div>
<!-- 转为正式客户窗口 end -->

<script >
    let zzCid

    $(document).ready(

        count(),
        show(1)
        );





    //$()


//上传事件
    $("#btn-customer").click(function () {
        $.ajax({
            url:"/customer/add",
            data:$("#form-add-customer").serialize(),
            type:"post",
            dataType:"json",
            success:function (result) {
                if(result.state==2000){
                    alert("上传成功")
                    location.reload(false)
                }
            }
        })
    })

    $("#btn-like").click(function () {
        $("#tab-like").children().remove()
        $("#tab-like").append("<tr style=\"font-weight: 700\">\n" +
            "                    <td>姓名</td>\n" +
            "                    <td>性别</td>\n" +
            "                    <td>手机号</td>\n" +
            "                    <td>公司</td>\n" +
            "                    <td>投保意向</td>\n" +
            "                    <td>操作</td>\n" +
            "                </tr>")

        $.ajax({
            url:"/customer/like",
            data:$("#form-like").serialize(),
            type:"post",
            dataType: "json",
            success:function (result) {
                if(result.state==2000){

                    for(list of result.data ){
                        let sex;
                        if(list.sex==0){
                             sex="女";
                        }else {
                            sex="男";
                        }

                        $("#tab-like").append("<tr cid='"+list.id+"'>" +
                            "<td>"+list.name+"</td>" +
                            "<td>"+sex+"</td>" +
                            "<td>"+list.tel+"</td>" +
                            "<td>"+list.company+"</td>" +
                            "<td>"+list.intention+"</td>" +
                            "<td>" +
                            "<button  data-toggle='modal' data-target='#showDesc' type='button' class='btn btn-primary btn-show'>查看详情</button>" +
                            "<button  data-toggle='modal' data-target='#toNormal' type='button' class='btn btn-primary btn-zz'>转为正式客户</button>" +
                            "</td>" +
                            "</tr>")


                    }
                    //点击查看详情
                    $(".btn-show").click(
                        function () {
                        let cid=$(this).parents("tr").attr("cid");
                        for(l of result.data ){
                            if(l.id==cid){
                                let se;
                                if(l.sex==0){
                                    se="女";
                                }else {
                                    se="男";
                                }
                                let marry;
                                if(l.marrystatus==0){
                                    marry="未婚";
                                }else {
                                    marry="已婚";
                                }
                                $("#name-show").text(l.name)
                                $("#tel-show").text(l.tel)
                                $("#sex-show").text(se)
                                $("#birthday-show").html(l.birthday)
                                $("#company-show").html(l.company)
                                $("#position-show").html(l.position)
                                $("#addr-show").html(l.addr)
                                $("#hobby-show").html(l.hobby)
                                $("#qq-show").html(l.qq)
                                $("#wx-show").html(l.wx)
                                $("#marrystatus-show").html(marry)
                                $("#intention-show").html(l.intention)
                                return;

                            }
                        }
                    })




                }
            }
        })
    })


    function zz(cid) {

        $.ajax({
            url:"/customer/addZz?cid="+cid,
            data:$("#form-zz").serialize(),
            type:"post",
            dataType:"json",
            success:function (result) {
                if(result.state==2000){
                    alert("转正成功")
                }
            }

        })
    }

    function show(index) {
        $.ajax({
            url:"/customer/showAll?index="+index,
            type:"get",
            dataType:"json",
            success:function (result) {
                if(result.state==2000){
                    for(list of result.data ){
                        let sex;
                        if(list.sex==0){
                            sex="女";
                        }else {
                            sex="男";
                        }

                        $("#tab-like").append("<tr cid='"+list.id+"'>" +
                            "<td>"+list.name+"</td>" +
                            "<td>"+sex+"</td>" +
                            "<td>"+list.tel+"</td>" +
                            "<td>"+list.company+"</td>" +
                            "<td>"+list.intention+"</td>" +
                            "<td>" +
                            "<button  data-toggle='modal' data-target='#showDesc' type='button' class='btn btn-primary btn-show'>查看详情</button>" +
                            "<button  data-toggle='modal' data-target='#toNormal' type='button' class='btn btn-primary btn-zz'>转为正式客户</button>" +
                            "<button  data-toggle='modal'  type='button' class='btn btn-primary public'>公共</button>" +
                            "<button  data-toggle='modal'  type='button' class='btn btn-primary del-cus'>删除</button>" +
                            "</td>" +
                            "</tr>")
                    }

                    $(".del-cus").click(function (){
                        if (confirm("确定删除该客户吗？")) {
                            zzCid=$(this).parents("tr").attr("cid");
                            $.ajax({
                                url:"/customer/delete?cid="+zzCid,
                                data:"get",
                                success:function (result){
                                    if(result.state==2000){
                                        location.reload(false);
                                    }else {
                                        alert(result.message)
                                    }
                                }
                            })
                        }

                    })

                    $(".public").click(function (){
                        if (confirm("确定放弃该客户吗？")) {
                            zzCid=$(this).parents("tr").attr("cid");
                            $.ajax({
                                url:"/customer/addPublic?cid="+zzCid,
                                data:"get",
                                success:function (result){
                                    if(result.state==2000){
                                        location.reload(false);
                                    }
                                }
                            })
                        }
                    })

                    $(".btn-zz").click(function () {
                         zzCid=$(this).parents("tr").attr("cid");

                    })
                    $(".form-zz").click(function(){

                            $.ajax({
                                url:"/customer/addZz?cid="+zzCid,
                                data:$("#form-zz").serialize(),
                                type:"post",
                                dataType:"json",
                                success:function (result) {
                                    if(result.state==2000){
                                        alert("转正成功")
                                    }else{
                                        alert("操作错误")
                                    }
                                }

                            })
                    }

                    )
                    //点击查看详情
                    $(".btn-show").click(function () {
                        let cid=$(this).parents("tr").attr("cid");
                        for(l of result.data ){
                            if(l.id==cid){
                                let se;
                                if(l.sex==0){
                                    se="女";
                                }else {
                                    se="男";
                                }
                                let marry;
                                if(l.marrystatus==0){
                                    marry="未婚";
                                }else {
                                    marry="已婚";
                                }
                                let birthday=renderTime(l.birthday)
                                $("#name-show").text(l.name)
                                $("#tel-show").text(l.tel)
                                $("#sex-show").text(se)
                                $("#birthday-show").html(birthday)
                                $("#company-show").html(l.company)
                                $("#position-show").html(l.position)
                                $("#addr-show").html(l.addr)
                                $("#hobby-show").html(l.hobby)
                                $("#qq-show").html(l.qq)
                                $("#wx-show").html(l.wx)
                                $("#marrystatus-show").html(marry)
                                $("#intention-show").html(l.intention)


                            }
                        }
                    })
                }
            }
        })
    }

    function count (){
        $.ajax({
            url:"/customer/count",
            type:"get",
            dataType:"json",
            success:function (result) {

                if(result.state==2000){
                    let num=result.data/5;
                    if(num>parseInt(num)){
                        num++;
                    }
                    for(let i=1;i<=num;i++){
                        $(".pagination").append(" <li><a >"+i+"</a></li>");
                    }

                }else {
                    alert("出现错误")
                }
                $(".pagination").children().click(function () {
                    console.log("点击获取坐标")
                    let index=$(this).text();

                    $("#tab-like").children().remove()
                    $("#tab-like").append("<tr style=\"font-weight: 700\">\n" +
                        "                    <td>姓名</td>\n" +
                        "                    <td>性别</td>\n" +
                        "                    <td>手机号</td>\n" +
                        "                    <td>公司</td>\n" +
                        "                    <td>投保意向</td>\n" +
                        "                    <td>操作</td>\n" +
                        "                </tr>")
                    show(index)
                })
            }
        });
    }

    function renderTime(date) {
        var dateee = new Date(date).toJSON();
        return new Date(+new Date(dateee) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
    }

</script>


</body>
</html>